package com.cal.utms.action.payment;

import com.cal.utms.dto.payment.AccountDto;
import com.cal.utms.model.payment.JournalEntryModel;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class AccountingAction extends ActionSupport implements ModelDriven<AccountDto> {

	private AccountDto accountDto = new AccountDto();
	private static final long serialVersionUID = 1L;
	private JournalEntryModel model = new JournalEntryModel();

	public String getAllAccountings() {
		accountDto.setAccountDtos(model.getAccountings());
		return Action.SUCCESS;
	}

	@Override
	public AccountDto getModel() {
		return accountDto;
	}

	public AccountDto getAccountDto() {
		return accountDto;
	}

	public void setAccountDto(AccountDto accountDto) {
		this.accountDto = accountDto;
	}

}
